/*
 * @Date: 2019-06-09 21:57:20
 * @Author: Ryan Huang
 * @Description:
 */
package main

import (
	"fmt"
	"strconv"
)

// strconv 通过函数转换string

func main() {
	var age int64 = 29
	var price float64 = 23.6512
	var isMale bool = true
	//var myChar byte = 'i'
	var str string
	str = strconv.FormatInt(age, 10)
	fmt.Printf("str's type is %T str = %q \n", str, str)
	str = strconv.FormatFloat(price, 'f', 10, 64)
	fmt.Printf("str's type is %T str = %q \n", str, str)
	str = strconv.FormatBool(isMale)
	fmt.Printf("str's type is %T str = %q \n", str, str)
	str = strconv.Itoa(int(age) + 20)
	fmt.Printf("str's type is %T str = %q \n", str, str)
}
